<!--看板设置-->
<template>
  <div>
    <div class="border-bottom" style="padding: 18px 20px 20px 20px">
      <span class="head-font">{{headName}}</span>
    </div>
    <router-view></router-view>
  </div>
</template>

<script>
  import Vue from 'vue'
  import { mapGetters } from 'vuex'
  export default {
    name: 'boardsetup',
    computed: {
      ...mapGetters({
        currentUser: 'currentUser'
      })
    },
    watch: {
      $route (to) {
        if (to.name === 'projectStatus') {
          this.headName = '数据填报'
        } else {
          this.headName = '全景图设置'
        }
      }
    },
    data () {
      return {
        headName: ''
      }
    },
    mounted () {
      if (this.$route.name === 'projectStatus') {
        this.headName = '数据填报'
      } else {
        this.headName = '全景图设置'
      }
    },
    beforeRouteEnter (to, from, next) {
      Vue.prototype.$store.dispatch({
        type: 'actstageList'
      }).then(res => {
        next()
      })
    }
  }
</script>
<style lang="scss" scoped>
  .head-font{
    font-size: 16px;
    line-height: 18px;
    padding-bottom: 18px;
    color: $color;
  }
</style>
